home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Cando v1.6 disk 1.adf / Install-ToHardDisk < prev    next >
Text File  |  1992-01-31  |  36KB  |  1,330 lines

  1. ;*************************************************************************
  2. ;    Title:
  3. ;        Install-CanDo
  4. ;*************************************************************************
  5. ;    Description:
  6. ;        The Commodore Installer Script for CanDo 1.6 Software
  7. ;*************************************************************************
  8. ;    Author:
  9. ;        Eddie Churchill, c/o INOVAtronics, Inc.
  10. ;*************************************************************************
  11. ;    Still to do:
  12. ;*************************************************************************
  13. ;    History:
  14. ;        17:21:33 CST, 21 Jan 1992
  15. ;            Added resident cando.library checking
  16. ;        11:55:39 CST, 20 Jan 1992
  17. ;            Added DelOpt settings
  18. ;        13:44:22 CST, 15 Jan 1992
  19. ;            Preserve old cando.info file if one exists
  20. ;        18:15:15 CST, 02 Jan 1992
  21. ;            Made it actually ask for destination in novice mode
  22. ;        15:19:24 CST, 19 Dec 1991
  23. ;            Updated for Installer 1.9
  24. ;        14:39:07 CST, 16 Dec 1991
  25. ;            Finished
  26. ;        11:28:31 CST, 03 Dec 1991
  27. ;            Rewritting script for Installer 1.7
  28. ;*************************************************************************
  29.  
  30.  
  31. ;******************************************************
  32. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  33. ;******************************************************
  34.  
  35. ; some useful variables
  36.     (set true 1)
  37.     (set false 0)
  38.     (set on true)
  39.     (set off false)
  40.     (set yes true)
  41.     (set no false)
  42.     (set yep yes)
  43.     (set nope no)
  44.     (set is_a_file 1)
  45.     (set is_a_dir 2)
  46.     (set quote "\"")
  47.     (set newline "\n")
  48.     (set nothing "")
  49.     (set testing nope)
  50. ;    (set testing yep) ;<- uncomment this for testing mode
  51.     (set os2 (< 2293760 (getversion "exec.library" (resident)))) ; true if under 2.0
  52.     (set resident_candolib (getversion "cando.library" (resident)))
  53.     (set ntsc_mode false)
  54.     (set pal_mode true)
  55.     (set free-mem (+ (database "total-mem") 0)) ; leftover free ram
  56.  
  57. ; set up our delete options
  58.     (delopts "AskUser" "OkNoDelete" "Force")
  59.  
  60. ; determine the default system display mode
  61.     (if (= (database "vblank") "60")
  62.         (set display_mode ntsc_mode)
  63.         (set display_mode pal_mode)
  64.     )
  65.  
  66. ; some useful procedures
  67.     ; fills in the display_text string
  68.     (procedure get_display_text
  69.         (
  70.             (if (= display_mode ntsc_mode)
  71.                 (set display_text "NTSC")
  72.                 (set display_text "PAL")
  73.             )
  74.         )
  75.     )
  76.     
  77.     ; change userlevel to expert
  78.     (procedure expert_level
  79.         (
  80.             (user 2)
  81.         )
  82.     )
  83.     
  84.     ; reset userlevel back to default
  85.     (procedure default_level
  86.         (
  87.             (user default-level)
  88.         )
  89.     )
  90.     
  91.     ; store off userlevel
  92.     (procedure save_default_level
  93.         (
  94.             (set default-level @user-level)
  95.         )
  96.     )
  97.  
  98. ; some overused strings
  99.     (set omp (cat "One moment please..." newline))
  100.     (set pci "Patching the copied icons.")
  101.  
  102. ; a general purpose global error trapper
  103.     (onerror
  104.         (makeassign "CanDoProgram_Master" (safe))
  105.         (makeassign "CanDoExtras_Master" (safe))
  106.         (makeassign "CanDoExamples_Master" (safe))
  107.     )
  108.  
  109.     
  110. ;****************************************
  111. ;***** FIGURE OUT WHERE STUFF GOES ******
  112. ;****************************************
  113.  
  114. ; now figure out the initial defaults for a bunch of things
  115.     (if (= testing true)
  116.         ( ; then clause
  117.             (set cando_dir "Ram:CanDo")
  118. ;            (set cando_dir nothing)
  119. ;            (set cando_dir (getassign "CanDo"))
  120.             (set c_dir "Ram:c")
  121.             (set libs_dir "Ram:libs")
  122.         )
  123.         ( ; else clause
  124.             ; @default-dest is already set for us
  125.             (set cando_dir (getassign "CanDo"))
  126.             (set c_dir (getassign "C"))
  127.             (set libs_dir (getassign "LIBS"))
  128.         )
  129.     )
  130.  
  131. ; introduce our selfs to the viewers
  132.     (welcome "Welcome to the CanDo 1.60 installer.  This installer uses "
  133.         "the Commodore Amiga Installer.  All of our future new products "
  134.         "will be using this installer and we would love to get any feedback "
  135.         "that might help in improving the installation procedure." newline newline
  136.     )
  137.  
  138. ; first reset the user level so that the novice can see whats going on
  139.     (save_default_level)
  140.     (expert_level)
  141.  
  142. ; see if we are doing an update
  143.     (if (<> cando_dir nothing)
  144.         (if (askbool
  145.                 (prompt "There seems to be a CanDo already installed in"
  146.                     " your drawer named " quote cando_dir quote ".  "
  147.                     "Do you want the update installed over it?")
  148.                 (help
  149.                     "The installer has determined that you may already have a "
  150.                     "copy of CanDo installed on your system. If this is wrong or "
  151.                     "you want the update installed elsewhere, select NO as an "
  152.                     "answer. Otherwise, select YES."
  153.                 )
  154.                 (default 1)
  155.             )
  156.             ( ; the then clause
  157.                 (set is_update true) ; hey, the user said yes
  158.             )
  159.             ( ; the else clause
  160.                 (set is_update false) ; hey, the user said nope
  161.                 (set cando_dir
  162.                     (askdir
  163.                         (prompt "Where would you like CanDo installed?")
  164.                         (help @askdir-help)
  165.                         (default @default-dest)
  166.                         (newpath)
  167.                     )
  168.                 )
  169.             )
  170.         )
  171.     )
  172.  
  173. ; if cando_dir is still nothing then where do they want it?
  174.     (if (= cando_dir nothing)
  175.         (set cando_dir
  176.             (askdir
  177.                 (prompt "Where would you like CanDo installed?")
  178.                 (help @askdir-help)
  179.                 (default @default-dest)
  180.                 (newpath)
  181.             )
  182.         )
  183.     )
  184.  
  185. ; before we go on lets reset the user's level back to what it was
  186.     (default_level)
  187.  
  188. ; verify that the cando directory exists
  189.     (if (<> (exists cando_dir) is_a_dir)
  190.         (makedir cando_dir
  191.             (prompt
  192.                 "The directory you have selected for CanDo does not "
  193.                 "seem to exist.  Do you want us to create it for you?"
  194.             )
  195.             (help @makedir-help)
  196.             (infos)
  197.             (confirm)
  198.         )
  199.     )
  200.  
  201. ; lets make sure the C: stuff goes there
  202.     (set c_dir
  203.         (askdir
  204.             (prompt "Where would you like CanDo's C: files installed?")
  205.             (help @askdir-help)
  206.             (default c_dir)
  207.             (newpath)
  208.         )
  209.     )
  210.     
  211.     ; verify that the directory exists
  212.     (if (<> (exists c_dir) is_a_dir)
  213.         (makedir c_dir
  214.             (prompt
  215.                 "The directory you have selected for CanDo 'C:' files does not "
  216.                 "seem to exist.  Do you want us to create it for you?"
  217.             )
  218.             (help @makedir-help)
  219.             (infos)
  220.             (confirm)
  221.         )
  222.     )
  223.  
  224. ; lets make sure the Libs: stuff goes there
  225.     (set libs_dir
  226.         (askdir
  227.             (prompt "Where would you like CanDo's Libs: files installed?")
  228.             (help @askdir-help)
  229.             (default libs_dir)
  230.             (newpath)
  231.         )
  232.     )
  233.  
  234.     ; verify that the directory exists
  235.     (if (<> (exists libs_dir) is_a_dir)
  236.         (makedir libs_dir
  237.             (prompt
  238.                 "The directory you have selected for CanDo 'Libs:' files does not "
  239.                 "seem to exist.  Do you want us to create it for you?"
  240.             )
  241.             (help @makedir-help)
  242.             (infos)
  243.             (confirm)
  244.         )
  245.     )
  246.  
  247.  
  248. ;***********************************
  249. ;***** GET FIRST DISK IN HERE ******
  250. ;***********************************
  251.  
  252. ; ask for the first disk, it should be here but lets check anyway
  253.     (askdisk
  254.         (prompt    "Please insert the disk labeled \"CanDo Program\".")
  255.         (help    "The CanDo Program disk contains the main CanDo program,"
  256.                 "CanDo.Library, DeckRunner, DeckBinder and some example decks."
  257.         )
  258.         (dest  "CanDo")
  259.         (newname "CanDoProgram_Master")
  260.     )
  261.  
  262. ; tell the user of our progress
  263.     (complete 5)
  264.  
  265.  
  266. ;************************************
  267. ;***** FIGURE OUT DISPLAY MODE ******
  268. ;************************************
  269.  
  270. ; tell the user about it
  271.     (working omp "Checking to see what type of Display this system uses.")
  272.     
  273. ; make sure the display_text is filled in
  274.     (get_display_text)
  275.     
  276. ; ask the expert user what mode to use
  277.     (set display_mode
  278.         (askchoice
  279.             (prompt "You are currently using a " display_text " system.  "
  280.                 "Which display system do you want CanDo configured for?"
  281.             )
  282.             (help "This should be initially set to the correct display system "
  283.                 "according to your Amiga.  If you want, you can override this.  "
  284.                 "NTSC is normally only useful in the Americas (USA, Canada, "
  285.                 " Mexico, etc.) whereas PAL is used everywhere else." newline
  286.                 "All this really does is choose which basedeck CanDo should "
  287.                 "default to.  NTSC's basedeck's window is 320 by 200 and PAL's "
  288.                 "is 320 by 256."
  289.                 newline newline
  290.                 @askchoice-help
  291.             )
  292.             (choices "NTSC Display (200/400 pixels high)" "PAL Display (256/512 pixels high)")
  293.             (default display_mode)
  294.         )
  295.     )
  296.  
  297. ; figure out the correct text string
  298.     (get_display_text)
  299.     
  300. ; tell the user of our progress
  301.     (complete 10)
  302.  
  303.  
  304. ;****************************************
  305. ;***** COPY OVER FIRST DISK'S STUFF *****
  306. ;****************************************
  307.  
  308. ; first copy over the c: stuff
  309.     (working omp "Scanning CanDo's C directory for files.")
  310.     
  311.     (set c_dir
  312.         (copyfiles
  313.             (prompt "Copying C: files needed by CanDo")
  314.             (help "This will copy " quote "DeckRunner" quote " and " quote
  315.                 "DeckBinder" quote " to your system's C directory." newline
  316.                 newline
  317.                 @copyfiles-help
  318.             )
  319.             (source "CanDoProgram_Master:C")
  320.             (dest c_dir)
  321.             (pattern "Deck#?")
  322.             (files)
  323.             (confirm)
  324.         )
  325.     )
  326.     
  327. ; look for c:deckrunner
  328.     (set deck_tool (tackon c_dir "DeckRunner"))
  329.     (if (<> (exists deck_tool) is_a_file)
  330.         (set deck_tool "DeckRunner")
  331.     )
  332.  
  333. ; look for c:deckbinder
  334.     (set bind_tool (tackon c_dir "DeckBinder"))
  335.     (if (<> (exists bind_tool) is_a_file)
  336.         (set bind_tool "DeckBinder")
  337.     )
  338.  
  339. ; tell the user of our progress
  340.     (complete 15)
  341.  
  342. ; first copy over the libs: stuff
  343.     (working omp "Scanning to see which libraries are on this distribution disk.")
  344.     
  345.     (copylib
  346.         (prompt "Copying/Updating CanDo.Library")
  347.         (source "CanDoProgram_Master:Libs/CanDo.Library")
  348.         (dest libs_dir)
  349.         (help "This will copy over the CanDo.Library file to your "
  350.             "system's Libs directory." newline newline
  351.             @copylib-help
  352.         )
  353.         (confirm)
  354.     )
  355.     
  356. ; tell the user of our progress
  357.     (complete 20)
  358.  
  359. ; which os are we running on?
  360.     (if (= os2 false)
  361.         (
  362.             (copylib ; math IEEE double base library
  363.                 (prompt "Copying/Updating MathIEEEDoubBas.Library")
  364.                 (source "CanDoProgram_Master:Libs/MathIEEEDoubBas.Library")
  365.                 (dest libs_dir)
  366.                 (help "This will copy over the 1.3 MathIEEEDoubBas.Library file "
  367.                     "to your system's Libs directory." newline newline
  368.                     @copylib-help
  369.                 )
  370.                 (confirm)
  371.             )
  372.             
  373.             (copylib ; math IEEE double transidental library
  374.                 (prompt "Copying/Updating MathIEEEDoubTrans.Library")
  375.                 (source "CanDoProgram_Master:Libs/MathIEEEDoubTrans.Library")
  376.                 (dest libs_dir)
  377.                 (help "This will copy over the 1.3 MathIEEEDoubTrans.Library file "
  378.                     "to your system's Libs directory." newline newline
  379.                     @copylib-help
  380.                 )
  381.                 (confirm)
  382.             )
  383.             
  384.             (copylib ; diskfont library
  385.                 (prompt "Copying/Updating DiskFont.Library")
  386.                 (source "CanDoProgram_Master:Libs/DiskFont.Library")
  387.                 (dest libs_dir)
  388.                 (help "This will copy over the 1.3 DiskFont.Library file "
  389.                     "to your system's Libs directory." newline newline
  390.                     @copylib-help
  391.                 )
  392.                 (confirm)
  393.             )
  394.             
  395.             (copylib ; Version library
  396.                 (prompt "Copying/Updating Version.Library")
  397.                 (source "CanDoProgram_Master:Libs/Version.Library")
  398.                 (dest libs_dir)
  399.                 (help "This will copy over the 1.3 Version.Library file "
  400.                     "to your system's Libs directory." newline newline
  401.                     @copylib-help
  402.                 )
  403.                 (optional)
  404.                 (confirm)
  405.             )
  406.             
  407.             (copylib ; Icon library
  408.                 (prompt "Copying/Updating Icon.Library")
  409.                 (source "CanDoProgram_Master:Libs/Icon.Library")
  410.                 (dest libs_dir)
  411.                 (help "This will copy over the 1.3 Icon.Library file "
  412.                     "to your system's Libs directory." newline newline
  413.                     @copylib-help
  414.                 )
  415.                 (confirm)
  416.             )
  417.         )
  418.         (
  419.             (message "You have 2.xx, so we won't install any of the other "
  420.                 "libraries included with CanDo.  You will need to have the "
  421.                 "following 2.xx libraries:" newline newline
  422.                 "MathIEEEDoubBas.Library" newline
  423.                 "MathIEEEDoubTrans.Library" newline
  424.                 "DiskFont.Library" newline newline
  425.                 "These libraries should be in your " quote "Libs:" quote
  426.                 " directory."
  427.                 (help "The CanDo diskettes come installed with the 1.3x libraries "
  428.                     "and system utilities and your system is installed with a newer "
  429.                     "operating system version so we should not install those libraries."
  430.                 )
  431.             )
  432.         )
  433.     )
  434.     
  435. ; tell the user of our progress
  436.     (complete 25)
  437.  
  438. ; preserving old cando info if it exists
  439.     (set temp (tackon cando_dir "CanDo.info"))
  440.     (if (= (exists temp) is_a_file)
  441.         (
  442.             (working omp "Preserving your old CanDo info file.")
  443.             (rename temp (tackon cando_dir "CanDo_Old.info"))
  444.         )
  445.     )
  446.     
  447. ; Copy over the cando program itself
  448.     (working omp "Scanning for the CanDo program and readme files.")
  449.     
  450.     (set cando_dir
  451.         (copyfiles
  452.             (prompt "Copying CanDo program and readme files")
  453.             (help "This will copy the CanDo program and some various "
  454.                 "readme files." newline newline
  455.                 @copyfiles-help
  456.             )
  457.             (source "CanDoProgram_Master:")
  458.             (dest cando_dir)
  459.             (pattern "(CanDo|ReadMeFirst|TheReader)")
  460.             (files)
  461.             (infos)
  462.             (confirm)
  463.         )
  464.     )
  465.     
  466. ; tell the user of our progress
  467.     (complete 30)
  468.  
  469. ; now patch the copied icons, if cando_dir exists
  470.     (if (and (= (exists cando_dir) is_a_dir) (<> cando_dir nothing))
  471.         (
  472.             (working omp pci)
  473.             
  474.             ; the cando program icon
  475.             (set cando_tool (tackon cando_dir "CanDo"))
  476.             (if (= (exists cando_tool) is_a_file)
  477.                 (tooltype
  478.                     (dest cando_tool)
  479.                     (settooltype "IconDefaultTool" (cat quote deck_tool quote))
  480.                     (noposition)
  481.                 )
  482.             )
  483.             
  484.             ; the reader program icon
  485.             (set temp (tackon cando_dir "TheReader"))
  486.             (if (= (exists temp) is_a_file)
  487.                 (
  488.                     (tooltype
  489.                         (dest temp)
  490.                         (noposition)
  491.                     )
  492.                     (set reader_tool temp)
  493.                 )
  494.                 (
  495.                     (set reader_tool "MORE")
  496.                 )
  497.             )
  498.             
  499.             ; the readmefirst text file
  500.             (set temp (tackon cando_dir "ReadMeFirst"))
  501.             (if (= (exists temp) is_a_file)
  502.                 (tooltype
  503.                     (dest temp)
  504.                     (setdefaulttool reader_tool)
  505.                     (noposition)
  506.                 )
  507.             )
  508.         )
  509.         (
  510.             ; since we did not figure out some things we need to set these variables
  511.             (set cando_tool "CanDo")
  512.             (set reader_tool "More")
  513.         )
  514.     )
  515.     
  516. ; tell the user of our progress
  517.     (complete 35)
  518.  
  519. ; copy over the decks and their resources
  520.     (working omp "Scanning for example decks and resource files.")
  521.     
  522.     (set stuff_dir
  523.         (copyfiles
  524.             (prompt "Copying example decks and their resource files.")
  525.             (help "This will copy the CanDo example decks and their "
  526.                 "resource files." newline newline
  527.                 @copyfiles-help
  528.             )
  529.             (source "CanDoProgram_Master:")
  530.             (dest cando_dir)
  531.             (pattern "(Images|Sounds|Text|Anims|BrushAnims|Brushes|Utilities|Decks)")
  532.             (infos)
  533.             (confirm)
  534.         )
  535.     )
  536.     
  537. ; tell the user of our progress
  538.     (complete 40)
  539.  
  540. ; now patch the copied icons, if stuff_dir exists
  541.     (if (and (= (exists stuff_dir) is_a_dir) (<> stuff_dir nothing))
  542.         (
  543.             (working omp pci)
  544.             
  545.             ; the drawer icons themselves
  546.             (foreach stuff_dir "(Images|Sounds|Text|Anims|BrushAnims|Brushes|Utilities|Decks)"
  547.                 (tooltype
  548.                     (dest (tackon stuff_dir @each-name))
  549.                     (noposition)
  550.                 )
  551.             )
  552.             
  553.             ; now set defaulttool of each of the decks
  554.             (set decks_dir (tackon stuff_dir "Decks"))
  555.             (if (and (= (exists decks_dir) is_a_dir) (<> decks_dir nothing))
  556.                 (foreach "CanDoProgram_Master:Decks" "~(#?.info)"
  557.                     (if (> 0 @each-type) ; hey its a file!
  558.                         (tooltype
  559.                             (dest (tackon decks_dir @each-name))
  560.                             (setdefaulttool deck_tool)
  561.                             (noposition)
  562.                         )
  563.                     )
  564.                 )
  565.             )
  566.             
  567.             ; fix up the cando icon for these resources
  568.             (if (= (exists cando_tool) is_a_file)
  569.                 (tooltype
  570.                     (dest cando_tool)
  571.                     (settooltype "Documents"
  572.                         (cat quote (tackon stuff_dir "Text") quote)
  573.                     )
  574.                     (settooltype "Images"
  575.                         (cat quote (tackon stuff_dir "Images") quote)
  576.                     )
  577.                     (settooltype "Sounds"
  578.                         (cat quote (tackon stuff_dir "Sounds") quote)
  579.                     )
  580.                     (settooltype "BrushAnims"
  581.                         (cat quote (tackon stuff_dir "BrushAnims") quote)
  582.                     )
  583.                     (settooltype "Brushes"
  584.                         (cat quote (tackon stuff_dir "Brushes") quote)
  585.                     )
  586.                     (settooltype "Applications"
  587.                         (cat quote (tackon stuff_dir "Applications") quote)
  588.                     )
  589.                     (settooltype "Decks"
  590.                         (cat quote decks_dir quote)
  591.                     )
  592.                 )
  593.             )
  594.         )
  595.         (
  596.             ; since we did not figure out the decks directory then set this var
  597.             (set decks_dir nothing)
  598.         )
  599.     )
  600.  
  601. ; tell the user of our progress
  602.     (complete 45)
  603.  
  604.  
  605. ;************************************
  606. ;***** GET SECOND DISK IN HERE ******
  607. ;************************************
  608.  
  609. ; ask for the second disk.
  610.     (askdisk
  611.         (prompt    "Please insert the disk labeled \"CanDo Extras\".")
  612.         (help    "The CanDo Extras disk contains various overlays and "
  613.             "support files for the CanDo program."
  614.         )
  615.         (dest  "CanDoExtras")
  616.         (newname "CanDoExtras_Master")
  617.     )
  618.  
  619. ; tell the user of our progress
  620.     (complete 50)
  621.  
  622.  
  623. ;*****************************************
  624. ;***** COPY OVER SECOND DISK'S STUFF *****
  625. ;*****************************************
  626.  
  627. ; copy over cando's files and overlays
  628.     (working omp "Scanning for CanDo's data files and overlays.")
  629.     
  630. ; due to a bug and because we want to still test we do this
  631.     (set extras_dir
  632.         (copyfiles
  633.             (prompt "Copying CanDo's data files and overlays.")
  634.             (help "This will copy the CanDo's data and overlay files."
  635.                 newline newline
  636.                 @copyfiles-help
  637.             )
  638.             (source "CanDoExtras_Master:")
  639.             (dest cando_dir)
  640.             (pattern "(CanDoFiles|EditorTools|HelpFiles|ObjectTools|XtraTools)")
  641.             (infos)
  642.             (confirm)
  643.         )
  644.     )
  645.     
  646. ; tell the user of our progress
  647.     (complete 55)
  648.  
  649. ; now patch the copied icons, if stuff_dir exists
  650.     (if (and (= (exists extras_dir) is_a_dir) (<> extras_dir nothing))
  651.         (
  652.             (working omp pci)
  653.             
  654.             ; the drawer icons themselves
  655.             (foreach extras_dir "(CanDoFiles|EditorTools|HelpFiles|ObjectTools|XtraTools)"
  656.                 (tooltype
  657.                     (dest (tackon stuff_dir @each-name))
  658.                     (noposition)
  659.                 )
  660.             )
  661.             
  662.             ; fix up the cando icon for these resources
  663.             (if (= (exists cando_tool) is_a_file)
  664.                 
  665.                 ; are the extras dirs in the same place as cando?
  666.                 (if (= cando_dir extras_dir)
  667.                     ( ; if they are the same then we don't need the tooltypes
  668.                         (tooltype
  669.                             (dest cando_tool)
  670.                             (settooltype "CanDoFiles")
  671.                             (settooltype "EditorTools")
  672.                             (settooltype "HelpFiles")
  673.                             (settooltype "ObjectTools")
  674.                             (settooltype "XtraTools")
  675.                         )
  676.                     )
  677.                     ( ; if they are different then we need to fill in the tooltypes
  678.                         (tooltype
  679.                             (dest cando_tool)
  680.                             (settooltype "CanDoFiles"
  681.                                 (cat quote (tackon extras_dir "CanDoFiles") quote)
  682.                             )
  683.                             (settooltype "EditorTools"
  684.                                 (cat quote (tackon extras_dir "EditorTools") quote)
  685.                             )
  686.                             (settooltype "HelpFiles"
  687.                                 (cat quote (tackon extras_dir "HelpFiles") quote)
  688.                             )
  689.                             (settooltype "ObjectTools"
  690.                                 (cat quote (tackon extras_dir "ObjectTools") quote)
  691.                             )
  692.                             (settooltype "XtraTools"
  693.                                 (cat quote (tackon extras_dir "XtraTools") quote)
  694.                             )
  695.                         )
  696.                     )
  697.                 )
  698.             )
  699.             
  700.             ; Set up the base deck based on display type
  701.             (working omp "Configuring CanDo to use " display_text " display.")
  702.             
  703.             ; since the cando is setup for ntsc we only need to this for pal mode
  704.             (if (= display_mode pal_mode)
  705.                 (
  706.                     ; make up the tempory directory name
  707.                     (set temp_dir (tackon extras_dir "CanDoFiles/Overlays"))
  708.                     
  709.                     ; rename current (NTSC) base deck to basedeck.ntsc
  710.                     (rename
  711.                         (tackon temp_dir "BaseDeck")
  712.                         (tackon temp_dir "BaseDeck.NTSC")
  713.                     )
  714.                     
  715.                     ; rename basedeck.pal to basedeck
  716.                     (rename
  717.                         (tackon temp_dir "BaseDeck.PAL")
  718.                         (tackon temp_dir "BaseDeck")
  719.                     )
  720.                 )
  721.             )
  722.             
  723.             ; tell the user of our progress
  724.             (complete 60)
  725.  
  726.             ; clean up the drawers.  remove any unneeded or out of date stuff
  727.             (working omp "Scanning for any unneeded or out of date stuff.")
  728.             
  729.             ; removing out of date images from CanDoFiles
  730.             (set temp_dir (tackon extras_dir "CanDoFiles"))
  731.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  732.                 (
  733.                     ; notify that we are working on this drawer
  734.                     (working omp "Cleaning up the CanDoFiles directory.")
  735.                     
  736.                     ; Delete CanDoFiles/UpAndDown.Grab
  737.                     (set temp_file (tackon temp_dir "UpAndDown.Grab"))
  738.                     (if (= (exists temp_file) is_a_file)
  739.                         (delete temp_file)
  740.                     )
  741.                     
  742.                     ; Delete CanDoFiles/EdToolStrip.Grab
  743.                     (set temp_file (tackon temp_dir "EdToolStrip.Grab"))
  744.                     (if (= (exists temp_file) is_a_file)
  745.                         (delete temp_file)
  746.                     )
  747.                     
  748.                     ; Delete CanDoFiles/DiskIcon.Grab
  749.                     (set temp_file (tackon temp_dir "DiskIcon.Grab"))
  750.                     (if (= (exists temp_file) is_a_file)
  751.                         (delete temp_file)
  752.                     )
  753.                 )
  754.             )
  755.                     
  756.             ; Removing some old (pre1.6) overlay files
  757.             (set temp_dir (tackon extras_dir "CanDoFiles/Overlays"))
  758.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  759.                 (
  760.                     ; notify that we are working on this drawer
  761.                     (working omp "Cleaning up the Overlays directory.")
  762.                     
  763.                     ; Delete CanDoFiles/Overlays/Extras
  764.                     (set temp_file (tackon temp_dir "Extras"))
  765.                     (if (= (exists temp_file) is_a_file)
  766.                         (delete temp_file)
  767.                     )
  768.                     
  769.                     ; Delete CanDoFiles/Overlays/GeneralList
  770.                     (set temp_file (tackon temp_dir "GeneralList"))
  771.                     (if (= (exists temp_file) is_a_file)
  772.                         (delete temp_file)
  773.                     )
  774.                     
  775.                     ; Delete CanDoFiles/Overlays/LittleLister
  776.                     (set temp_file (tackon temp_dir "LittleLister"))
  777.                     (if (= (exists temp_file) is_a_file)
  778.                         (delete temp_file)
  779.                     )
  780.                     
  781.                     ; Delete CanDoFiles/Overlays/Misc
  782.                     (set temp_file (tackon temp_dir "Misc"))
  783.                     (if (= (exists temp_file) is_a_file)
  784.                         (delete temp_file)
  785.                     )
  786.                 )
  787.             )
  788.             
  789.             ; Cleanup editor tools
  790.             (set temp_dir (tackon extras_dir "EditorTools"))
  791.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  792.                 (
  793.                     ; notify that we are working on this drawer
  794.                     (working omp "Cleaning up the EditorTools directory.")
  795.                     
  796.                     ; delete the old routines tool if it exists
  797.                     (set my_dir (tackon temp_dir "Routines"))
  798.                     (if (= (exists my_dir) is_a_dir)
  799.                         (
  800.                             (delete (tackon my_dir "Resource"))
  801.                             (delete (tackon my_dir "ToolIcon.Grab"))
  802.                             (delete (tackon my_dir ".info"))
  803.                             (delete my_dir)
  804.                             (delete (cat my_dir ".info"))
  805.                         )
  806.                     )
  807.                     
  808.                     ; if the layout tool then it is out of date, slick it
  809.                     (set my_dir (tackon temp_dir "Layout"))
  810.                     (if (= (exists my_dir) is_a_dir)
  811.                         (
  812.                             ; first delete all the stuff in the directory
  813.                             (foreach my_dir "#?"
  814.                                 (if (< 0 @each-type) ; hey its a directory!
  815.                                     (
  816.                                         ; if the item is a directory then delete inside
  817.                                         (set my2_dir (tackon my_dir @each-name))
  818.                                         (foreach my2_dir "#?"
  819.                                             (delete (tackon my2_dir @each-name))
  820.                                         )
  821.                                         
  822.                                         ; then delete the directory
  823.                                         (delete my2_dir)
  824.                                     )
  825.                                     ; otherwise delete the file
  826.                                     (delete (tackon my_dir @each-name))
  827.                                 )
  828.                             )
  829.                             
  830.                             ; then delete the directory and its icon
  831.                             (delete my_dir)
  832.                             (delete (cat my_dir ".info"))
  833.                         )
  834.                     )
  835.                     
  836.                     ; if paint/brushes exists then delete it
  837.                     (set my_dir (tackon temp_dir "Paint/Brushes"))
  838.                     (if (= (exists my_dir) is_a_dir)
  839.                         (
  840.                             ; delete the brushes directory
  841.                             (delete (tackon my_dir "Complement.Grab"))
  842.                             (delete (tackon my_dir "Jam1.Grab"))
  843.                             (delete (tackon my_dir "Jam2.Grab"))
  844.                             (delete (tackon my_dir "PaintPanel.Grab"))
  845.                             (delete (tackon my_dir ".info"))
  846.                             (delete my_dir)
  847.                             (delete (cat my_dir ".info"))
  848.                         )
  849.                     )
  850.                 )
  851.             )
  852.             
  853.             ; Clean up helpfiles directory
  854.             (set temp_dir (tackon extras_dir "HelpFiles"))
  855.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  856.                 (
  857.                     ; notify that we are working on this drawer
  858.                     (working omp "Cleaning up the HelpFiles directory.")
  859.                     
  860.                     ; if file Main.Index exists then delete it
  861.                     (set temp_file (tackon temp_dir "Main.Index"))
  862.                     (if (= (exists temp_file) is_a_file)
  863.                         (delete temp_file)
  864.                     )
  865.                     
  866.                     ; if directories exists then delete them
  867.                     (if (exists (tackon temp_dir "ARexx"))
  868.                         (foreach temp_dir "#?"
  869.                             (if (< 0 @each-type) ; hey its a directory!
  870.                                 (
  871.                                     (set my_dir (tackon temp_dir @each-name))
  872.                                     (foreach my_dir "#?"
  873.                                         (delete (tackon my_dir @each-name))
  874.                                     )
  875.                                     (delete my_dir)
  876.                                     (delete (cat my_dir ".info"))
  877.                                 )
  878.                             )
  879.                         )
  880.                     )
  881.                 )
  882.             )
  883.             
  884.             ; tell the user of our progress
  885.             (complete 65)
  886.  
  887.             ; Cleanup object tools
  888.             (set temp_dir (tackon extras_dir "ObjectTools"))
  889.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  890.                 (
  891.                     ; notify that we are working on this drawer
  892.                     (working omp "Cleaning up the ObjectTools directory.")
  893.                     
  894.                     ; delete the old routines tool if it exists
  895.                     (set my_dir (tackon temp_dir "Routines"))
  896.                     (if (= (exists my_dir) is_a_dir)
  897.                         (
  898.                             (delete (tackon my_dir "Resource"))
  899.                             (delete (tackon my_dir "Handler"))
  900.                             (delete (tackon my_dir ".info"))
  901.                             (delete my_dir)
  902.                             (delete (cat my_dir ".info"))
  903.                         )
  904.                     )
  905.                     
  906.                     ; delete old directory in document objecttool
  907.                     (set my_dir (tackon temp_dir "Document/Brushes"))
  908.                     (if (= (exists my_dir) is_a_dir)
  909.                         (
  910.                             ; the brushes directory
  911.                             (delete (tackon my_dir "ScrollBar.Grab"))
  912.                             (delete (tackon my_dir "ScrollBar.Grab.info"))
  913.                             (delete (tackon my_dir ".info"))
  914.                             (delete my_dir)
  915.                             (delete (cat my_dir ".info"))
  916.                         )
  917.                     )
  918.                     
  919.                     ; delete old directory in field objecttool
  920.                     (set my_dir (tackon temp_dir "Field/Brushes"))
  921.                     (if (= (exists my_dir) is_a_dir)
  922.                         (
  923.                             ; the brushes directory
  924.                             (delete (tackon my_dir "Justification.Grab"))
  925.                             (delete (tackon my_dir "Justification.Grab.info"))
  926.                             (delete (tackon my_dir ".info"))
  927.                             (delete my_dir)
  928.                             (delete (cat my_dir ".info"))
  929.                         )
  930.                     )
  931.                     
  932.                     ; delete old directory in Window objecttool
  933.                     (set my_dir (tackon temp_dir "Window/Brushes"))
  934.                     (if (= (exists my_dir) is_a_dir)
  935.                         (
  936.                             ; the brushes directory
  937.                             (delete (tackon my_dir "Objects.Grab"))
  938.                             (delete (tackon my_dir "Objects.Grab.info"))
  939.                             (delete (tackon my_dir ".info"))
  940.                             (delete my_dir)
  941.                             (delete (cat my_dir ".info"))
  942.                         )
  943.                     )
  944.                 )
  945.             )
  946.             
  947.             ; Wipe out xtratools
  948.             (set temp_dir (tackon extras_dir "XtraTools"))
  949.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  950.                 (
  951.                     ; notify that we are working on this drawer
  952.                     (working omp "Cleaning up the XtraTools directory.")
  953.                     
  954.                     ; delete everything except the Error object
  955.                     (foreach temp_dir "~(Error|Error.info)"
  956.                         (if (< 0 @each-type) ; hey its a directory!
  957.                             (
  958.                                 (set my_dir (tackon temp_dir @each-name))
  959.                                 (foreach my_dir "#?"
  960.                                     (delete (tackon my_dir @each-name))
  961.                                 )
  962.                                 (delete my_dir)
  963.                             )
  964.                             (delete (tackon temp_dir @each-name))
  965.                         )
  966.                     )
  967.                 )
  968.             )
  969.         )
  970.     )
  971.     
  972. ; tell the user of our progress
  973.     (complete 70)
  974.  
  975.  
  976. ;************************************
  977. ;***** GET THIRD DISK IN HERE ******
  978. ;************************************
  979.  
  980. ; ask for the second disk.
  981.     (askdisk
  982.         (prompt    "Please insert the disk labeled \"CanDo Examples and Utilities\".")
  983.         (help    "The CanDo Examples and Utilities disk contains various utilities and "
  984.             "example decks for your use."
  985.         )
  986.         (dest  "CanDoExamples")
  987.         (newname "CanDoExamples_Master")
  988.     )
  989.  
  990. ; tell the user of our progress
  991.     (complete 75)
  992.  
  993.  
  994. ;****************************************
  995. ;***** COPY OVER THIRD DISK'S STUFF *****
  996. ;****************************************
  997.  
  998. ; copy cando example disk's decks, cliutilities and utilities stuff
  999.     (working omp "Scanning for CanDo's utilities and example decks.")
  1000.     
  1001. ; due to a bug and because we want to still test we do this
  1002.     (set mostuff_dir
  1003.         (copyfiles
  1004.             (prompt "Copying CanDo's utilities and example decks.")
  1005.             (help "This will copy the CanDo's utilities and example decks."
  1006.                 newline newline
  1007.                 @copyfiles-help
  1008.             )
  1009.             (source "CanDoExamples_Master:")
  1010.             (dest stuff_dir)
  1011.             (pattern "(CLIUtilities|Utilities|Errata.Doc|Decks)")
  1012.             (infos)
  1013.             (confirm)
  1014.         )
  1015.     )
  1016.  
  1017. ; tell the user of our progress
  1018.     (complete 80)
  1019.  
  1020. ; now patch the copied icons, if mostuff_dir exists
  1021.     (if (and (= (exists mostuff_dir) is_a_dir) (<> mostuff_dir nothing))
  1022.         (
  1023.             (working omp pci)
  1024.             
  1025.             ; first fix up the drawer icons
  1026.             (foreach mostuff_dir "(CLIUtilities|Utilities|Decks)"
  1027.                 (tooltype
  1028.                     (dest (tackon mostuff_dir @each-name))
  1029.                     (noposition)
  1030.                 )
  1031.             )
  1032.             
  1033.             ; then fix up the readme file icon
  1034.             (tooltype
  1035.                 (dest (tackon mostuff_dir "Errata.Doc"))
  1036.                 (noposition)
  1037.                 (setdefaulttool reader_tool)
  1038.             )
  1039.             
  1040.             ; patch icons in the CLIutilities drawer
  1041.             (set temp_dir (tackon mostuff_dir "CLIUtilities"))
  1042.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  1043.                 (
  1044.                     ; first the readme files
  1045.                     (foreach temp_dir "#?.doc"
  1046.                         (tooltype
  1047.                             (dest (tackon temp_dir @each-name))
  1048.                             (noposition)
  1049.                             (setdefaulttool reader_tool)
  1050.                         )
  1051.                     )
  1052.                     
  1053.                     ; identify the deckbrowser tool
  1054.                     (set browse_tool (tackon temp_dir "DeckBrowser"))
  1055.                     (if (<> (exists browse_tool) is_a_file)
  1056.                         (set browse_tool "DeckBrowser")
  1057.                     )
  1058.                     
  1059.                     ; identify the shutdowndeck tool
  1060.                     (set killdeck_tool (tackon temp_dir "ShutDownDeck"))
  1061.                     (if (<> (exists killdeck_tool) is_a_file)
  1062.                         (set killdeck_tool "ShutDownDeck")
  1063.                     )
  1064.                 )
  1065.                 (
  1066.                     ; else fill in tool vars with defaults
  1067.                     (set browse_tool "DeckBrowser")
  1068.                     (set killdeck_tool "ShutDownDeck")
  1069.                 )
  1070.             )
  1071.             
  1072.             ; patch icons in the utilities drawer
  1073.             (set temp_dir (tackon mostuff_dir "Utilities"))
  1074.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  1075.                 (
  1076.                     ; first the readme files
  1077.                     (foreach temp_dir "#?.doc"
  1078.                         (tooltype
  1079.                             (dest (tackon temp_dir @each-name))
  1080.                             (noposition)
  1081.                             (setdefaulttool reader_tool)
  1082.                         )
  1083.                     )
  1084.                     
  1085.                     ; patch thebinder utility
  1086.                     (set temp_file (tackon temp_dir "TheBinder"))
  1087.                     (if (= (exists temp_file) is_a_file)
  1088.                         (tooltype
  1089.                             (dest temp_file)
  1090.                             (settooltype "Source" (cat quote decks_dir quote))
  1091.                             (settooltype "Destination" (cat quote "Ram:Application" quote))
  1092.                             (settooltype "RunnerNeedsLibrary" (cat quote deck_tool quote))
  1093.                             (settooltype "RunnerNoLibrary" (cat quote browse_tool quote))
  1094.                             (settooltype "Binder" (cat quote bind_tool quote))
  1095.                             (noposition)
  1096.                         )
  1097.                     )
  1098.                     
  1099.                     ; patch themultibinder utility
  1100.                     (set temp_file (tackon temp_dir "TheMultiBinder"))
  1101.                     (if (= (exists temp_file) is_a_file)
  1102.                         (tooltype
  1103.                             (dest temp_file)
  1104.                             (settooltype "Source" (cat quote decks_dir quote))
  1105.                             (settooltype "Destination" (cat quote "Ram:Application" quote))
  1106.                             (settooltype "RunnerNeedsLibrary" (cat quote deck_tool quote))
  1107.                             (settooltype "RunnerNoLibrary" (cat quote browse_tool quote))
  1108.                             (settooltype "Binder" (cat quote bind_tool quote))
  1109.                             (settooltype "ObjectsOnly" "No")
  1110.                             (noposition)
  1111.                         )
  1112.                     )
  1113.                     
  1114.                     ; patch therelocator utility
  1115.                     (set temp_file (tackon temp_dir "TheRelocator"))
  1116.                     (if (= (exists temp_file) is_a_file)
  1117.                         (tooltype
  1118.                             (dest temp_file)
  1119.                             (settooltype "Source" (cat quote decks_dir quote))
  1120.                             (settooltype "Destination" (cat quote "Ram:NewDeck" quote))
  1121.                             (noposition)
  1122.                         )
  1123.                     )
  1124.                     
  1125.                     ; patch theprinter utility
  1126.                     (set temp_file (tackon temp_dir "ThePrinter"))
  1127.                     (if (= (exists temp_file) is_a_file)
  1128.                         (tooltype
  1129.                             (dest temp_file)
  1130.                             (settooltype "Source" (cat quote decks_dir quote))
  1131.                             (noposition)
  1132.                         )
  1133.                     )
  1134.                     
  1135.                     ; patch stopcando utility
  1136.                     (set temp_file (tackon temp_dir "StopCanDo"))
  1137.                     (if (= (exists temp_file) is_a_file)
  1138.                         (tooltype
  1139.                             (dest temp_file)
  1140.                             (settooltype "DeckKiller" (cat quote killdeck_dir quote))
  1141.                             (noposition)
  1142.                         )
  1143.                     )
  1144.                 )
  1145.             )
  1146.             
  1147.             ; tell the user of our progress
  1148.             (complete 85)
  1149.  
  1150.             ; patch icons in the decks drawer
  1151.             (set temp_dir (tackon mostuff_dir "Decks"))
  1152.             (if (and (= (exists temp_dir) is_a_dir) (<> temp_dir nothing))
  1153.                 (
  1154.                     ; then patch each drawer of decks
  1155.                     (foreach "CanDoExamples_Master:Decks" "~(#?.info)"
  1156.                         (if (< 0 @each-type) ; hey its a directory!
  1157.                             (
  1158.                                 ; shorten the path
  1159.                                 (set my_dir (tackon temp_dir @each-name))
  1160.                                 
  1161.                                 ; now do the decks inside
  1162.                                 (foreach my_dir "~(#?.#?)"
  1163.                                     (if (> 0 @each-type) ; hey its a file!
  1164.                                         (tooltype
  1165.                                             (dest (tackon my_dir @each-name))
  1166.                                             (setdefaulttool deck_tool)
  1167.                                             (noposition)
  1168.                                         )
  1169.                                     )
  1170.                                 )
  1171.                                 (tooltype
  1172.                                     (dest (tackon my_dir "AboutTheseDecks.Doc"))
  1173.                                     (setdefaulttool reader_tool)
  1174.                                     (noposition)
  1175.                                 )
  1176.                                 
  1177.                                 ; patch the drawer's icon
  1178.                                 (tooltype
  1179.                                     (dest my_dir)
  1180.                                     (noposition)
  1181.                                 )
  1182.                             )
  1183.                         )
  1184.                     )
  1185.                     
  1186.                     ; then patch the weird sub-dirs: subdecks
  1187.                     (set my_dir (tackon temp_dir "ComplexExamples/SubDecks"))
  1188.                     (if (= (exists temp_dir) is_a_dir)
  1189.                         (
  1190.                             (foreach my_dir "~(#?.#?)" ;<- no icons
  1191.                                 (tooltype
  1192.                                     (dest (tackon my_dir @each-name))
  1193.                                     (setdefaulttool deck_tool)
  1194.                                     (noposition)
  1195.                                 )
  1196.                             )
  1197.                         )
  1198.                     )
  1199.                     
  1200.                     ; then patch the weird sub-dirs: helpfiles
  1201.                     (set my_dir (tackon temp_dir "ComplexExamples/BudgetHelpFiles"))
  1202.                     (if (= (exists temp_dir) is_a_dir)
  1203.                         (
  1204.                             (foreach my_dir "BudHelp.???" ;<- no icons
  1205.                                 (tooltype
  1206.                                     (dest (tackon my_dir @each-name))
  1207.                                     (setdefaulttool reader_tool)
  1208.                                     (noposition)
  1209.                                 )
  1210.                             )
  1211.                         )
  1212.                     )
  1213.                 )
  1214.             )
  1215.         )
  1216.     )
  1217.             
  1218. ; tell the user of our progress
  1219.     (complete 90)
  1220.  
  1221. ; copy any cando example disk xtratools that may exists.
  1222.     (working omp "Scanning for additional XtraTools.")
  1223.     
  1224.     ; scan the directory
  1225.     (set temp_dir "CanDoExamples_Master:MoreXtraTools")
  1226.     (if (= (exists temp_dir) is_a_dir)
  1227.         ( ; if they exists then copy the directory
  1228.             (copyfiles
  1229.                 (prompt "Copying additional XtraTools.")
  1230.                 (help "This will copy the additional XtraTools from the Examples Disk."
  1231.                     newline newline
  1232.                     @copyfiles-help
  1233.                 )
  1234.                 (source temp_dir)
  1235.                 (dest (tackon extras_dir "XtraTools"))
  1236.                 (pattern "#?")
  1237.                 (infos)
  1238.                 (confirm)
  1239.             )
  1240.         )
  1241.         ( ; else none where found
  1242.             (working "No additional XtraTools where found.")
  1243.         )
  1244.     )
  1245.  
  1246. ; tell the user of our progress
  1247.     (complete 95)
  1248.  
  1249. ; copy any cando example disk editortools that may exists.
  1250.     (working omp "Scanning for additional EditorTools.")
  1251.     
  1252.     ; scan the directory
  1253.     (set temp_dir "CanDoExamples_Master:MoreEditorTools")
  1254.     (if (= (exists temp_dir) is_a_dir)
  1255.         ( ; if they exists then copy the directory
  1256.             (copyfiles
  1257.                 (prompt "Copying additional EditorTools.")
  1258.                 (help "This will copy the additional EditorTools from the Examples Disk."
  1259.                     newline newline
  1260.                     @copyfiles-help
  1261.                 )
  1262.                 (source temp_dir)
  1263.                 (dest (tackon extras_dir "EditorTools"))
  1264.                 (pattern "#?")
  1265.                 (infos)
  1266.                 (confirm)
  1267.             )
  1268.         )
  1269.         ( ; else none where found
  1270.             (working "No additional EditorTools where found.")
  1271.         )
  1272.     )
  1273.  
  1274. ; tell the user of our progress
  1275.     (complete 100)
  1276.  
  1277.  
  1278. ;*****************************
  1279. ;***** WE BE ALMOST DONE *****
  1280. ;*****************************
  1281.  
  1282. ; make sure that default-dir is pointing to the right place
  1283.     (set @default-dest cando_dir)
  1284.  
  1285. ; some debug stuff
  1286.     (if testing
  1287.         (
  1288.             (debug (cat "cando_dir     = " quote cando_dir quote))
  1289.             (debug (cat "c_dir         = " quote c_dir quote))
  1290.             (debug (cat "libs_dir      = " quote libs_dir quote))
  1291.             (debug (cat "deck_tool     = " quote deck_tool quote))
  1292.             (debug (cat "bind_tool     = " quote bind_tool quote))
  1293.             (debug (cat "browse_tool   = " quote browse_tool quote))
  1294.             (debug (cat "killdeck_tool = " quote killdeck_tool quote))
  1295.             (debug (cat "cando_tool    = " quote cando_tool quote))
  1296.             (debug (cat "reader_tool   = " quote reader_tool quote))
  1297.             (debug (cat "stuff_dir     = " quote stuff_dir quote))
  1298.             (debug (cat "mostuff_dir   = " quote mostuff_dir quote))
  1299.             (debug (cat "decks_dir     = " quote decks_dir quote))
  1300.         )
  1301.     )
  1302.  
  1303. ; unmake those three assignments
  1304.     (makeassign "CanDoProgram_Master" (safe))
  1305.     (makeassign "CanDoExtras_Master" (safe))
  1306.     (makeassign "CanDoExamples_Master" (safe))
  1307.  
  1308. ; final message for our viewers
  1309.     ; well either way we want to say this
  1310.     (set end_text "Well thats it folks, have a fun time with CanDo v1.60.") ; altspace in name
  1311.     
  1312.     ; if the system has a library loaded then ask user to reset their machine
  1313.     (if (> resident_candolib 0)
  1314.         (set end_text
  1315.             (cat
  1316.                 "!! REBOOT YOUR MACHINE BEFORE USING CANDO !!"
  1317.                 newline
  1318.                 newline
  1319.                 "This machine has an old version of CanDo.library in memory.  "
  1320.                 "In order to flush the library you should reboot your machine."
  1321.                 newline
  1322.                 newline
  1323.                 end_text
  1324.             )
  1325.         )
  1326.     )
  1327.     
  1328.     ; now for the real exit
  1329.     (exit end_text)
  1330.